#pragma once
//Casa@130523b
//Read Test set and offer access to data
#include<string>
#include<memory>
#include<vector>
//standard headers
#include"global.h"
using namespace std;
//A test set
class testset
{
protected:
	string _Name;
	vector<string> _Data;
public:
	testset(const string& filename);
	~testset(void);
	//the number of vectors
	int num()const;
	//vector length
	int length()const;
	int size()const;
	const string& name()const;	
	const vector<string>& data()const;
	unique_ptr<vector<string>> data_reverse()const;
	unique_ptr<string> data_string()const;
	//0,1,X
	static tuple<int,int,int> count(const string& str);
	static double ratio(int original,int generate);
};

inline int testset::num()const
{
	return _Data.size();
}
//vector length
inline int testset::length()const
{ 
	return testset::_Data.front().length();
}
inline int testset::size()const
{
	return num()*length();
}
inline const string& testset::name()const
{
	return _Name;
}
inline	const vector<string>& testset::data()const
{
	return _Data;
}
